/**
 * Copyright (c) iwindplus Technologies Co., Ltd.2024-2030, All rights reserved.
 */

package com.iwindplus.setup.domain.dto;

import com.iwindplus.boot.domain.dto.DbBaseDTO;
import com.iwindplus.boot.domain.enums.EnableStatusEnum;
import com.iwindplus.boot.domain.validation.EditGroup;
import com.iwindplus.boot.domain.validation.SaveGroup;
import com.iwindplus.boot.domain.enums.VodTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Length;

/**
 * 视频点播配置数据传输对象.
 *
 * @author zengdegui
 * @since 2018/9/1
 */
@Schema(description = "视频点播配置数据传输对象")
@Data
@EqualsAndHashCode(callSuper = false)
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class VodConfigDTO extends DbBaseDTO {

    /**
     * 状态（DISABLE：禁用，ENABLE：启用，LOCKED：锁定）.
     */
    @Schema(description = "状态（DISABLE：禁用，ENABLE：启用，LOCKED：锁定）")
    private EnableStatusEnum status;

    /**
     * 编码.
     */
    @Schema(description = "编码")
    private String code;

    /**
     * 名称.
     */
    @Schema(description = "名称")
    @NotBlank(message = "{name.notEmpty}", groups = {SaveGroup.class, EditGroup.class})
    @Length(max = 50, message = "{name.length}", groups = {SaveGroup.class, EditGroup.class})
    private String name;

    /**
     * 类型.
     */
    @Schema(description = "类型")
    @NotNull(message = "{vodType.notEmpty}", groups = {SaveGroup.class, EditGroup.class})
    private VodTypeEnum type;

    /**
     * 服务器区域.
     */
    @Schema(description = "服务器区域")
    @NotBlank(message = "{region.notEmpty}", groups = {SaveGroup.class, EditGroup.class})
    @Length(max = 100, message = "{region.length}", groups = {SaveGroup.class, EditGroup.class})
    private String region;

    /**
     * 访问key.
     */
    @Schema(description = "访问key")
    @NotBlank(message = "{accessKey.notEmpty}", groups = {SaveGroup.class, EditGroup.class})
    @Length(max = 100, message = "{accessKey.length}", groups = {SaveGroup.class, EditGroup.class})
    private String accessKey;

    /**
     * 密匙.
     */
    @Schema(description = "密匙")
    @NotBlank(message = "{secretKey.notEmpty}", groups = {SaveGroup.class})
    @Length(max = 100, message = "{secretKey.length}", groups = {SaveGroup.class})
    private String secretKey;

    /**
     * sts地域节点（可选）.
     */
    @Schema(description = "sts地域节点")
    @Length(max = 100, message = "{stsEndpoint.length}", groups = {SaveGroup.class, EditGroup.class})
    private String stsEndpoint;

    /**
     * RAM角色（可选）.
     */
    @Schema(description = "RAM角色")
    private String roleArn;

    /**
     * RAM权限策略（可选，如果policy为空，则用户将获得该角色下所有权限）.
     */
    @Schema(description = "RAM权限策略")
    private String policy;

    /**
     * 回调地址.
     */
    @Schema(description = "回调地址")
    private String notifyUrl;

    /**
     * 是否内置（false：否，true：是）.
     */
    @Schema(description = "是否内置（false：否，true：是）")
    private Boolean buildInFlag;

    /**
     * 组织主键.
     */
    @Schema(description = "组织主键")
    private Long orgId;
}